package com.xcity.pomelo.response;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class TurnTableRollResponse extends Response {
	
	private int freeNum; // 剩余次数
	private int point; // 投掷点数
	private int gold; // 消耗现金
	private byte type; // 奖励类型(0:没有奖励;1:物品;2:现金;3:钻石)
	
	public static final byte NO_REWARD = 0;
	public static final byte ITEM_REWARD = 1;
	public static final byte GOLD_REWARD = 2;
	public static final byte STONE_REWARD = 3;

	public TurnTableRollResponse(int serial, int freeNum, int point, int gold, byte type) {
		super(serial);
		this.freeNum = freeNum;
		this.point = point;
		this.gold = freeNum > 0 ? 0 : gold;
		this.type = type;
	}

	public int getFreeNum() {
		return freeNum;
	}

	public void setFreeNum(int freeNum) {
		this.freeNum = freeNum;
	}

	public int getPoint() {
		return point;
	}

	public void setPoint(int point) {
		this.point = point;
	}

	public int getGold() {
		return gold;
	}

	public void setGold(int gold) {
		this.gold = gold;
	}

	public byte getType() {
		return type;
	}

	public void setType(byte type) {
		this.type = type;
	}

}
